home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Applications / vim / everything else / doc / vim.1 < prev    next >
Encoding:
Text File  |  1994-11-22  |  5.1 KB  |  163 lines  |  [TEXT/VIM!]

  1. .TH VIM 1 "1994 August 12"
  2. .SH NAME
  3. vim \- Vi IMproved, a programmers text editor
  4. .SH SYNOPSIS
  5. .B vim
  6. [options] [file ..]
  7. .br
  8. .B vim
  9. [options] \-t tag
  10. .br
  11. .B vim
  12. [options] \-e [errorfile]
  13. .SH DESCRIPTION
  14. .B Vim
  15. is a text editor that is upwards compatible to vi. It can be used to edit any 
  16. ASCII text. It is especially useful for editing programs.
  17. .PP
  18. There are a lot of enhancements above vi: multi level undo,
  19. multi windows and buffers, command line 
  20. editing, filename completion, on-line help, visual selection, etc..
  21. Read difference.doc 
  22. for a summary of the differences between vi and Vim.
  23. .PP
  24. Most often
  25. .B Vim
  26. is started to edit a single file with the command
  27. .PP
  28.     vim file
  29. .PP
  30. More generally VIM is started with:
  31. .PP
  32.     vim [options] [filelist]
  33. .PP
  34. If the filelist is missing, the editor will start with an empty buffer.
  35. Otherwise exactly one out of the following three may be used to choose one or
  36. more files to be edited.
  37. .TP 12
  38. file ..
  39. A list of file names. The first one (alphabetically) will be
  40. the current file and read into the buffer. The cursor will be
  41. positioned on the first line of the buffer. You can get to the other files
  42. with the ":next" command.
  43. .TP
  44. -t {tag}
  45. The file to edit and the initial cursor position depends on a "tag", a sort 
  46. of goto label. {tag} is looked up in the tags file, the associated file 
  47. becomes the current file and the associated command is executed. Mostly this 
  48. is used for C programs. {tag} then should be a function name. The effect is 
  49. that the file containing that function becomes the current file and the 
  50. cursor is positioned on the start of the function (see reference.doc, 
  51. section "tag searches").
  52. .TP
  53. -e [errorfile]
  54. Start in quickFix mode. The file [errorfile]
  55. is read and the first error is displayed. If [errorfile] is omitted the file
  56. name is obtained from the 'errorfile' option (defaults to "AztecC.Err" for
  57. the Amiga, "errors" on other systems). Further errors can be jumped to 
  58. with the ":cn" command. See reference.doc section 5.5.
  59. .SH OPTIONS
  60. The options, if present, must precede the filelist. The options may be given 
  61. in any order.
  62. .TP 12
  63. -r
  64. Recovery mode. The swap file is used to recover a crashed editing session. The
  65. swap file is a file with the same file name as the text file with ".swp"
  66. appended. See reference.doc, chapter "Recovery after a crash".
  67. .TP
  68. -v
  69. View mode. The 'readonly' option will be set. You can still 
  70. edit the buffer, but will be prevented from accidently 
  71. overwriting a file. If you do want to overwrite a file, add 
  72. an exclamation mark to the Ex command, as in ":w!".
  73. The -v option also implies the -n option (see below).
  74. The 'readonly' option can be reset with ":set noro" (see reference.doc, 
  75. options chapter).
  76. .TP
  77. -b
  78. Binary. A few options will be set that makes it possible to edit a binary or
  79. executable file.
  80. .TP
  81. +[num]
  82. For the first file the cursor will be positioned on line
  83. "num". If "num" is missing, the cursor will be positioned on
  84. the last line.
  85. .TP
  86. +/pat
  87. For the first file the cursor will be positioned on the
  88. first occurrence of "pat" (see reference.doc, 
  89. section "pattern searches" for the available search 
  90. patterns).
  91. .TP
  92. +{command}
  93. .TP
  94. -c {command}
  95. {command} will be executed after the 
  96. first file has been read. {command} is interpreted as an Ex 
  97. command. If the {command} contains spaces it must 
  98. be enclosed in double quotes (this depends on the shell that 
  99. is used).
  100. Example: Vim "+set si" main.c
  101. .TP
  102. -x
  103. (Amiga only) Vim is not restarted to open a new window. This option should 
  104. be used when Vim is executed by a program that will wait for the edit 
  105. session to finish (e.g. mail). The ":sh" and ":!" commands will not work.
  106. .TP
  107. -o[N]
  108. Open N windows. When N is omitted, open one window for each file.
  109. .TP
  110. -n
  111. No swap file will be used. Recovery after a crash 
  112. will be impossible. Handy if you want to edit a file on a 
  113. very slow medium (e.g. floppy). Can also be done with ":set 
  114. uc=0". Can be undone with ":set uc=200".
  115. .TP
  116. -s {scriptin}
  117. The script file {scriptin} is read. The characters in the 
  118. file are interpreted as if you had typed them. The same can 
  119. be done with the command ":source! {scriptin}". If the end 
  120. of the file is reached before the editor exits, further 
  121. characters are read from the keyboard.
  122. .TP
  123. -w {scriptout}
  124. All the characters that you type are recorded in the file
  125. {scriptout}, until you exit VIM. This is useful if you want 
  126. to create a script file to be used with "vim -s" or 
  127. ":source!".
  128. .TP
  129. -T terminal
  130. Tells Vim the name of the terminal you are using. Should be a terminal known 
  131. to Vim (builtin) or defined in the termcap file.
  132. .TP
  133. -d device
  134. Open "device" for use as a terminal. Only on the Amiga. Example:
  135. "\-d con:20/30/600/150".
  136. .SH SEE ALSO
  137. Vim documentation:
  138. .TP 12
  139. reference.doc:
  140. A complete reference of Vim (long)
  141. .TP
  142. windows.doc:
  143. Explanation of the multi windows and buffers commands and options
  144. .TP
  145. index:
  146. Overview of all command characters (useful when adding new mappings)
  147. .TP
  148. difference.doc:
  149. Overview of the differences between vi and Vim
  150. .TP
  151. unix.doc:
  152. Unix-specific comments
  153. .TP
  154. vim.hlp:
  155. File used by the on-line help (short)
  156. .SH AUTHOR
  157. Most of VIM was made by Bram Moolenaar.
  158. .br
  159. VIM is based on Stevie, worked on by: Tim Thompson,
  160. Tony Andrews and G.R. (Fred) Walter
  161. .SH BUGS
  162. Probably.
  163.